home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / amazin1a / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-09-10  |  12.9 KB  |  434 lines

  1. VERSION 5.00
  2. Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "Programming Utilities"
  6.    ClientHeight    =   4815
  7.    ClientLeft      =   165
  8.    ClientTop       =   825
  9.    ClientWidth     =   9735
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4815
  12.    ScaleWidth      =   9735
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.PictureBox Picture1 
  15.       BorderStyle     =   0  'None
  16.       Height          =   4215
  17.       Left            =   120
  18.       ScaleHeight     =   4215
  19.       ScaleWidth      =   9495
  20.       TabIndex        =   0
  21.       Top             =   480
  22.       Width           =   9495
  23.       Begin VB.CommandButton Command5 
  24.          Caption         =   "Exit"
  25.          Height          =   375
  26.          Left            =   7800
  27.          TabIndex        =   18
  28.          Top             =   3720
  29.          Width           =   1575
  30.       End
  31.       Begin VB.ComboBox Combo1 
  32.          Height          =   315
  33.          ItemData        =   "Form1.frx":0000
  34.          Left            =   5040
  35.          List            =   "Form1.frx":000A
  36.          TabIndex        =   17
  37.          Text            =   "*.FRM"
  38.          Top             =   0
  39.          Width           =   1935
  40.       End
  41.       Begin VB.DriveListBox Drive1 
  42.          Height          =   315
  43.          Left            =   7680
  44.          TabIndex        =   14
  45.          Top             =   0
  46.          Width           =   1695
  47.       End
  48.       Begin VB.CommandButton Command2 
  49.          Caption         =   "Find FRM files"
  50.          Height          =   375
  51.          Left            =   6000
  52.          TabIndex        =   1
  53.          Top             =   3720
  54.          Width           =   1695
  55.       End
  56.       Begin MSFlexGridLib.MSFlexGrid Grille1 
  57.          Height          =   2895
  58.          Left            =   0
  59.          TabIndex        =   2
  60.          Top             =   360
  61.          Width           =   7695
  62.          _ExtentX        =   13573
  63.          _ExtentY        =   5106
  64.          _Version        =   393216
  65.          FixedCols       =   0
  66.          ScrollTrack     =   -1  'True
  67.          FocusRect       =   2
  68.          GridLinesFixed  =   1
  69.          AllowUserResizing=   3
  70.       End
  71.       Begin VB.Label Label8 
  72.          Caption         =   "File Type :"
  73.          BeginProperty Font 
  74.             Name            =   "MS Sans Serif"
  75.             Size            =   8.25
  76.             Charset         =   0
  77.             Weight          =   700
  78.             Underline       =   0   'False
  79.             Italic          =   0   'False
  80.             Strikethrough   =   0   'False
  81.          EndProperty
  82.          Height          =   255
  83.          Left            =   4080
  84.          TabIndex        =   16
  85.          Top             =   0
  86.          Width           =   975
  87.       End
  88.       Begin VB.Label Label7 
  89.          Caption         =   "Drive :"
  90.          BeginProperty Font 
  91.             Name            =   "MS Sans Serif"
  92.             Size            =   8.25
  93.             Charset         =   0
  94.             Weight          =   700
  95.             Underline       =   0   'False
  96.             Italic          =   0   'False
  97.             Strikethrough   =   0   'False
  98.          EndProperty
  99.          Height          =   255
  100.          Left            =   7080
  101.          TabIndex        =   15
  102.          Top             =   0
  103.          Width           =   615
  104.       End
  105.       Begin VB.Label Label6 
  106.          Caption         =   "Files"
  107.          Height          =   375
  108.          Left            =   0
  109.          TabIndex        =   13
  110.          Top             =   0
  111.          Width           =   3615
  112.       End
  113.       Begin VB.Label Label1 
  114.          Height          =   375
  115.          Left            =   0
  116.          TabIndex        =   4
  117.          Top             =   3240
  118.          Width           =   9375
  119.       End
  120.       Begin VB.Label Label2 
  121.          Caption         =   "Files Found"
  122.          Height          =   255
  123.          Left            =   0
  124.          TabIndex        =   3
  125.          Top             =   3840
  126.          Width           =   1335
  127.       End
  128.    End
  129.    Begin VB.PictureBox Picture2 
  130.       BorderStyle     =   0  'None
  131.       Height          =   4215
  132.       Left            =   120
  133.       ScaleHeight     =   4215
  134.       ScaleWidth      =   9495
  135.       TabIndex        =   5
  136.       Top             =   480
  137.       Width           =   9495
  138.       Begin VB.CommandButton Command3 
  139.          Caption         =   "Exit"
  140.          Height          =   375
  141.          Left            =   7800
  142.          TabIndex        =   19
  143.          Top             =   3720
  144.          Width           =   1575
  145.       End
  146.       Begin VB.CommandButton Command1 
  147.          Caption         =   "Search Function and Sub"
  148.          Height          =   375
  149.          Left            =   5640
  150.          TabIndex        =   8
  151.          Top             =   3720
  152.          Width           =   2055
  153.       End
  154.       Begin VB.CheckBox Check1 
  155.          Caption         =   "Include ''_"" character"
  156.          Height          =   255
  157.          Left            =   3720
  158.          TabIndex        =   7
  159.          Top             =   3840
  160.          Width           =   1815
  161.       End
  162.       Begin MSFlexGridLib.MSFlexGrid Grille2 
  163.          Height          =   3015
  164.          Left            =   0
  165.          TabIndex        =   6
  166.          Top             =   240
  167.          Width           =   7695
  168.          _ExtentX        =   13573
  169.          _ExtentY        =   5318
  170.          _Version        =   393216
  171.          FixedCols       =   0
  172.       End
  173.       Begin VB.Label Label3 
  174.          Height          =   375
  175.          Left            =   0
  176.          TabIndex        =   11
  177.          Top             =   3240
  178.          Width           =   9375
  179.       End
  180.       Begin VB.Label Label4 
  181.          Caption         =   "Functions/Subs Found"
  182.          Height          =   255
  183.          Left            =   0
  184.          TabIndex        =   10
  185.          Top             =   3720
  186.          Width           =   2295
  187.       End
  188.       Begin VB.Label Label5 
  189.          Caption         =   "VB Functions and Subs"
  190.          Height          =   375
  191.          Left            =   0
  192.          TabIndex        =   9
  193.          Top             =   0
  194.          Width           =   1695
  195.       End
  196.    End
  197.    Begin MSComctlLib.TabStrip TabStrip1 
  198.       Height          =   4815
  199.       Left            =   0
  200.       TabIndex        =   12
  201.       Top             =   0
  202.       Width           =   9735
  203.       _ExtentX        =   17171
  204.       _ExtentY        =   8493
  205.       _Version        =   393216
  206.       BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
  207.          NumTabs         =   2
  208.          BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  209.             Caption         =   "Search File"
  210.             ImageVarType    =   2
  211.          EndProperty
  212.          BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  213.             Caption         =   "Search Function"
  214.             ImageVarType    =   2
  215.          EndProperty
  216.       EndProperty
  217.    End
  218.    Begin VB.Menu mnuFile 
  219.       Caption         =   "File"
  220.       Begin VB.Menu mnuExit 
  221.          Caption         =   "Exit"
  222.       End
  223.    End
  224.    Begin VB.Menu mnuHelp 
  225.       Caption         =   "Help"
  226.       Begin VB.Menu mnuHelpContent 
  227.          Caption         =   "Help Content"
  228.       End
  229.       Begin VB.Menu mnuline1 
  230.          Caption         =   "-"
  231.       End
  232.       Begin VB.Menu mnuAbout 
  233.          Caption         =   "About"
  234.       End
  235.    End
  236.    Begin VB.Menu mnuSPMenu 
  237.       Caption         =   "SPMenu"
  238.       Enabled         =   0   'False
  239.       Visible         =   0   'False
  240.       Begin VB.Menu mnuCopy 
  241.          Caption         =   "Copy"
  242.       End
  243.       Begin VB.Menu mnuView 
  244.          Caption         =   "View"
  245.       End
  246.    End
  247. Attribute VB_Name = "Form1"
  248. Attribute VB_GlobalNameSpace = False
  249. Attribute VB_Creatable = False
  250. Attribute VB_PredeclaredId = True
  251. Attribute VB_Exposed = False
  252. Dim rightmouse As Boolean
  253. Dim okMNU As Boolean
  254. Dim posx As Single
  255. Dim posy As Single
  256. Private Sub Command1_Click()
  257. Grille2.Clear
  258. Form2.Show 1
  259. okMNU = True
  260. End Sub
  261. Public Sub AddFunctionSub(ByVal item As String, ByVal fpath As String)
  262. With Grille2
  263.      .AddItem item
  264.      .Row = .Rows - 1
  265.      .Col = 1
  266.      .Text = fpath
  267. End With
  268. End Sub
  269. Private Sub Command2_Click()
  270. ProgressCancel = False
  271. Grille1.Clear
  272. Grille2.Clear
  273. Grille1.Rows = 1
  274. Grille2.Rows = 1
  275. InitGrille1
  276. InitGrille2
  277. NbFile = 0
  278. okMNU = False
  279. Command1.Enabled = False
  280. Form4.Show 1
  281. Command1.Enabled = True
  282. okMNU = True
  283. End Sub
  284. Private Sub Command3_Click()
  285. End Sub
  286. Private Sub Command5_Click()
  287. End Sub
  288. Private Sub Form_Load()
  289. Command1.Enabled = False
  290. ProgressCancel = False
  291. Picture1.ZOrder
  292. Drive1.Drive = "C:\"
  293. InitGrille1
  294. InitGrille2
  295. End Sub
  296. Private Sub InitGrille2()
  297. With Grille2
  298. .Cols = 2
  299. .Rows = 1
  300. .Row = 0
  301. .Col = 0
  302. .Text = "Function/Sub"
  303. .Col = 1
  304. .Text = "File"
  305. .ColWidth(0) = 4550
  306. .ColWidth(1) = 4550
  307. .Width = 4550 + 4550 + 350
  308. End With
  309. End Sub
  310. Private Sub InitGrille1()
  311. With Grille1
  312. .Cols = 3
  313. .Rows = 1
  314. .Row = 0
  315. .Col = 0
  316. .Text = "File Name"
  317. .Col = 1
  318. .Text = "Path"
  319. .Col = 2
  320. .Text = "Size"
  321. .ColWidth(0) = 2550
  322. .ColWidth(1) = 4950
  323. .ColWidth(2) = 1600
  324. .Width = 1600 + 4950 + 2550 + 350
  325. End With
  326. End Sub
  327. '**********************************************
  328. '* Function FindFile is From Planet-Source-Code
  329. '* Strongly modified by Carlos 09-10-99
  330. '***********************************************
  331. Public Sub FindFile(ByVal path As String, ByVal ftype As String)
  332.        Dim hFile As Long, ts As String, WFD As WIN32_FIND_DATA
  333.        Dim result As Long, sAttempt As String, szPath As String
  334.        Dim Strtemp
  335.        If ProgressCancel Then Exit Sub
  336.        Form4.ProgressBar1.Value = 1
  337.        szPath = path & "*.*" & Chr$(0)
  338.        'Start asking windows for files.
  339.        putfileinpath path, ftype
  340.        hFile = FindFirstFile(szPath, WFD)
  341.        Do
  342.          If WFD.dwFileAttributes And FILE_ATTRIBUTE_DIRECTORY Then
  343.           'Hey look, we've got a directory!
  344.              ts = StripNull(WFD.cFileName)
  345.              If Not (ts = "." Or ts = "..") Then
  346.                  'Don't look for hidden or system directories
  347.                  If Not (WFD.dwFileAttributes And (FILE_ATTRIBUTE_HIDDEN Or FILE_ATTRIBUTE_SYSTEM)) Then
  348.                      'Search directory recursively
  349.                      FindFile path & ts & "\", ftype
  350.                  End If
  351.              End If
  352.            End If
  353.            WFD.cFileName = ""
  354.            result = FindNextFile(hFile, WFD)
  355.            Label1.Caption = "Searching in: " & path
  356.            DoEvents
  357.           If Form4.ProgressBar1.Value = Form4.ProgressBar1.Max Then Form4.ProgressBar1.Value = 1
  358.           Form4.ProgressBar1.Value = Form4.ProgressBar1.Value + 1
  359.         Loop Until result = 0
  360.        FindClose hFile
  361. End Sub
  362. '**********************************************
  363. '* Function putfileinpath is From Planet-Source-Code
  364. '* Modified by Carlos 09-10-99
  365. '***********************************************
  366. Private Sub putfileinpath(ByVal zpath As String, ByVal FileType As String)
  367.        Dim hFile As Long, result As Long, szPath As String
  368.        Dim WFD As WIN32_FIND_DATA
  369.        szPath = zpath & FileType & Chr$(0)
  370.        'Start asking windows for files.
  371.        hFile = FindFirstFile(szPath, WFD)
  372.        Dim pos1
  373.        Do
  374.            pos1 = InStr(1, WFD.cFileName, Chr$(0), vbBinaryCompare)
  375.            If Trim(Mid(WFD.cFileName, 1, pos1 - 1)) <> "" Then
  376.               AddAfile WFD, zpath
  377.            End If
  378.            WFD.cFileName = ""
  379.            result = FindNextFile(hFile, WFD)
  380.           ' DoEvents
  381.        Loop Until result = 0
  382.        FindClose hFile
  383. End Sub
  384. Private Sub AddAfile(WFDP As WIN32_FIND_DATA, ByVal path As String)
  385.           NbFile = NbFile + 1
  386.           With Grille1
  387.              .AddItem Trim(WFDP.cFileName)
  388.              .Row = NbFile
  389.              .Col = 1
  390.              .Text = path
  391.              .Col = 2
  392.              .Text = WFDP.nFileSizeLow / 1000 & " Kb   "
  393.           End With
  394.           Label2.Caption = NbFile & " Files Found."
  395. End Sub
  396. Private Sub Grille2_Click()
  397. If okMNU Then
  398.   If Not rightmouse Then
  399.     'MsgBox Grille1.Row
  400.     PopupMenu mnuSPMenu
  401.     rightmouse = False
  402.   End If
  403. End If
  404. End Sub
  405. Private Sub Grille2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  406. If Button = 2 Then
  407.  rightmouse = True
  408. End If
  409. End Sub
  410. Private Sub mnuAbout_Click()
  411. Form3.Show 1
  412. End Sub
  413. Private Sub mnuCopy_Click()
  414. MsgBox "Put copy to clipboard code HERE!"
  415. End Sub
  416. Private Sub mnuExit_Click()
  417. End Sub
  418. Private Sub mnuView_Click()
  419. If Grille2.Col = 1 Then
  420.   TypeView = 1
  421.   TypeView = 0
  422. End If
  423. StringToFind = Grille2.Text
  424. Grille2.Col = 1
  425. FileFSToOpen = Grille2.Text
  426. Form6.Show 1
  427. End Sub
  428. Private Sub TabStrip1_Click()
  429. If TabStrip1.SelectedItem = "Search File" Then
  430.  Picture1.ZOrder
  431. Picture2.ZOrder
  432. End If
  433. End Sub
  434.